#ifndef Printer_H
#define Printer_H

#include "Defines.h"

class Entity;
class ExpressionComponent;
class String;

class Printer{
	
	public:
		
		Printer() { }
		
		Printer& operator() ();
		
		Printer& operator<< (const char *);
		Printer& operator<< (bool);
		Printer& operator<< (char);
		Printer& operator<< (short);
		Printer& operator<< (int);
		Printer& operator<< (unsigned int);
		Printer& operator<< (float);
		Printer& operator<< (double);
		
		template <class C>
		Printer& operator<< (const C&);
		
		static OString formatted (int);
};

static Printer * Printer_ptr = new Printer();

#define Printer (*Printer_ptr)

template <class C>
Printer& Printer::operator<< (const C& c){
	c.print();
	return *this;
}

#endif